home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.awt;
-
- import java.awt.Button;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Frame;
- import java.awt.Label;
- import java.awt.LayoutManager;
- import java.awt.TextField;
- import symantec.itools.awt.KeyPressManagerPanel;
- import symantec.itools.db.pro.ConnectionInfo;
- import symantec.itools.db.pro.Logon;
-
- public class LogonFrame extends Frame implements Logon {
- KeyPressManagerPanel keyPressManagerPanel1;
- // $FF: renamed from: OK java.awt.Button
- Button field_0;
- Button Cancel;
- TextField UserNameEdit;
- TextField UserPasswordEdit;
- Label label3;
- Label label4;
- Label datasource;
- Label datasource1;
- ConnectionInfo m_ConnectionInfo;
- boolean m_Action;
-
- public LogonFrame() {
- super("LogonFrame window");
- ((Container)this).setLayout((LayoutManager)null);
- ((Frame)this).addNotify();
- ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 360, ((Container)this).insets().top + ((Container)this).insets().bottom + 152);
- ((Component)this).setBackground(new Color(12632256));
- this.keyPressManagerPanel1 = new KeyPressManagerPanel();
- this.keyPressManagerPanel1.setLayout((LayoutManager)null);
- this.keyPressManagerPanel1.reshape(((Container)this).insets().left, ((Container)this).insets().top, 360, 152);
- ((Container)this).add(this.keyPressManagerPanel1);
- this.field_0 = new Button("OK");
- this.field_0.reshape(68, 108, 85, 25);
- this.keyPressManagerPanel1.add(this.field_0);
- this.Cancel = new Button("Cancel");
- this.Cancel.reshape(164, 108, 85, 25);
- this.keyPressManagerPanel1.add(this.Cancel);
- this.UserNameEdit = new TextField(28);
- this.UserNameEdit.reshape(164, 37, 166, 23);
- this.keyPressManagerPanel1.add(this.UserNameEdit);
- this.UserPasswordEdit = new TextField(28);
- this.UserPasswordEdit.setEchoCharacter('*');
- this.UserPasswordEdit.reshape(164, 65, 166, 23);
- this.keyPressManagerPanel1.add(this.UserPasswordEdit);
- this.label3 = new Label("User Name:");
- this.label3.reshape(56, 40, 90, 15);
- this.keyPressManagerPanel1.add(this.label3);
- this.label4 = new Label("Password:");
- this.label4.reshape(64, 68, 90, 15);
- this.keyPressManagerPanel1.add(this.label4);
- this.datasource = new Label("DataSource Name:");
- this.datasource.reshape(16, 5, 133, 15);
- this.keyPressManagerPanel1.add(this.datasource);
- this.datasource1 = new Label("DataSource Name:");
- this.datasource1.reshape(164, 5, 200, 15);
- this.keyPressManagerPanel1.add(this.datasource1);
- ((Frame)this).setTitle("Untitled");
- }
-
- public void show() {
- super.show();
- }
-
- public boolean handleEvent(Event var1) {
- if (var1.id == 1001 && var1.target == this.Cancel) {
- this.clickedCancel();
- return true;
- } else if (var1.id == 1001 && var1.target == this.field_0) {
- this.clickedOK();
- return true;
- } else if (var1.id == 201) {
- ((Component)this).hide();
- return true;
- } else {
- return super.handleEvent(var1);
- }
- }
-
- public void clickedOK() {
- this.m_ConnectionInfo.setUser(this.UserNameEdit.getText());
- this.m_ConnectionInfo.setPassword(this.UserPasswordEdit.getText());
- this.m_Action = true;
- ((Component)this).hide();
- }
-
- public void clickedCancel() {
- this.m_Action = false;
- ((Component)this).hide();
- }
-
- public boolean logonFailed(ConnectionInfo var1, int var2) {
- this.m_ConnectionInfo = var1;
- this.UserNameEdit.setText(var1.getUser());
- this.UserPasswordEdit.setText(var1.getPassword());
- this.datasource1.setText(var1.getDBString());
- ((Frame)this).setTitle("User Authentication");
- this.show();
-
- while(((Component)this).isVisible()) {
- Thread.currentThread();
- Thread.yield();
- }
-
- var1 = this.m_ConnectionInfo;
- return this.m_Action;
- }
- }
-